<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCmcSystemCityTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('cmc_system_city', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('city_id')->default('0')->comment('城市id');
            $table->integer('level')->default('0')->comment('省市级别');
            $table->integer('parent_id')->default('0')->comment('父级id');
            $table->string('area_code')->default('')->comment('区号');
            $table->string('name')->default('')->comment('名称');
            $table->string('merger_name')->default('')->comment('合并名称');
            $table->string('lng')->default('')->comment('经度');
            $table->string('lat')->default('')->comment('纬度');
            $table->tinyInteger('is_show')->default('1')->comment('是否展示');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('cmc_system_city');
    }
}
